package com.note.simpleshop.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "tb_coupon_send", schema = "simpleshop", catalog = "")
public class TbCouponSend {
    private String id;
    private String code;
    private String couponCode;
    private String drawerId;
    private Integer isUse;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "coupon_code")
    public String getCouponCode() {
        return couponCode;
    }

    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    @Basic
    @Column(name = "drawer_id")
    public String getDrawerId() {
        return drawerId;
    }

    public void setDrawerId(String drawerId) {
        this.drawerId = drawerId;
    }

    @Basic
    @Column(name = "is_use")
    public Integer getIsUse() {
        return isUse;
    }

    public void setIsUse(Integer isUse) {
        this.isUse = isUse;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbCouponSend that = (TbCouponSend) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(code, that.code) &&
                Objects.equals(couponCode, that.couponCode) &&
                Objects.equals(drawerId, that.drawerId) &&
                Objects.equals(isUse, that.isUse);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, code, couponCode, drawerId, isUse);
    }
}
